package com.constant;

import com.entity.Course;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.io.File;
import java.io.IOException;
import java.util.Date;

/**
 * date:2021/5/10
 * description:
 * Author:
 */

public class Bin {

//    public static Course getCourse(@RequestParam("multiFiles") MultipartFile file, Integer id, String course_name,
//                                   String author, Integer recommendation_grade, Integer course_type_id,
//                                   HttpSession session) throws IOException {
////        Course course = new Course();
////        String path = session.getServletContext().getRealPath("/upload/course_cover");
////        File file1 = new File(path);
////        file1.mkdir();
////        String fileName = file.getOriginalFilename();
////        file.transferTo(new File(file1,fileName));
////        course.setId(id);
////        course.setCourse_name(course_name);
////        course.setAuthor(author);
////        course.setCover_image_url(fileName);
////        course.setCreate_date(new Date());
////        course.setClick_number(0);
////        course.setStatus(Constant.STATUS_ENABLE);
////        course.setRecommendation_grade(recommendation_grade);
////        course.setCourse_type_id(course_type_id);
////        return course;
//    }
}


